<?php
	var_dump($_POST);
?>
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8" />
	<title>兄弟连论坛-PHP技术交流</title>
	<link href="../public/home/css/qingkongsuoyougeshi.css" rel="stylesheet" type="text/css"/>
	<link href="../public/home/css/css1.css" rel="stylesheet" type="text/css" />
</head>	
<body>
	<div id="tou1">
		<div>
			<div>
				<div id="hang1">
					<a href="#">设为首页</a>
					<a href="#">收藏LAMP兄弟连</a>
					<a href="#">帮助</a>
					<a href="#">推广链接</a>
					<a href="#">社区应用</a>
					<a href="#">最新帖子</a>
					<a href="#">精华区</a>
					<a href="#">社区服务</a>
					<a href="#">会员列表</a>
					<a href="#">统计排行</a>
					<a href="#">搜索</a>
				</div>
			</div>	
		</div>
		<div>
			<div>
				<img src="../public/home/img/logo.png" />
				<?php
					//session_start();
					if(!isset($_POST['id'])){
						
					?>
				<form method="post" action="xo.php">
					<input type="text" name="usename" />
					<input type="password" name="passwd" />
					<input type="checkbox" name="zhaohui" />
						<span>记住密码</span>
					<a href="#">找回密码</a>
					<input type="submit" name="submit" value="登录"/>
					<input type="button" name="zhuce" value="注册" />
				</form>
				<?php
					}else{
						//$id = $_POST['id'];
							//		用id 查出头像图片
							$con = mysqli_connect('localhost','root','www');
							mysqli_set_charset($con,'utf8');
							mysqli_select_db($con,'admin');
							$SQL2 = "select * from userDetail where id={$_POST['id']}";
							$result2 = mysqli_query($con,$SQL2);
							$arr2 = mysqli_fetch_assoc($result2);
							
							//  	查出user表中用户的权限
							$con = mysqli_connect('localhost','root','www');
							mysqli_set_charset($con,'utf8');
							mysqli_select_db($con,'admin');
							$SQL3 = "select * from user where id={$_POST['id']}";
							$result3 = mysqli_query($con,$SQL3);
							$arr3 = mysqli_fetch_assoc($result3);
							$auths = array('普通用户','管理员');					
					
					
					
					
				?>
				
					<div id='php'>
							<div id='php1'>
								<div><p>会员名：<?php echo $arr2['name'];; ?> &nbsp;.</p></div>
								<div><p>[<?php echo $auths[$arr3['auth']] ?>]</p></div>
								<div><p>[积分:50]</p></div>
							</div>
							<div id='php2'>
								<div><img src="../public/home/tmp_name/<?php echo $arr2['photo']; ?>" /></div>
							</div>
							<div id='php3'>
											<!--<a href='./updateNames.php'>更改个人信息</a>
											<a href='./updateHeadPhoto.php?id=<?php echo $_GET['id']; ?>'>更改头像</a>-->
							</div>
							<div id='php4'>
								<a href='./out.php'>退出</a>
							</div>
							<div style='clear:both'></div>
					</div>
					
				
				
				<?php
					}
				?>
				
			</div>
		</div>
		<div>
			<div>
				<a href="#">技术交流</a>
				<a href="#">兄弟连</a>
				<a href="#">连队趣事</a>
				<a href="#">议事厅</a>
			</div>
		</div>
	</div>
	<div id="tou2">
		<div id="kuang1">
			<div>
				<div id="zhongbu1">
						<a href="./postList.php?tid=<?php echo $_POST['tid']; ?>&id=<?php echo $_POST['id']; ?>"><img src="../public/home/img/home.gif.png"></a>
						<span>LAMP兄弟连 > PHP技术交流 > 发表帖子</span>
				</div>
				
				<?php
					//链接数据库，用tid查找type类的 类名，图片
					$con = mysqli_connect('localhost','root','www');
					mysqli_set_charset($con,'utf8');
					mysqli_select_db($con,'admin');
					$SQL5 = "select * from type where id={$_POST['tid']}";
					$result5 = mysqli_query($con,$SQL5);
					$arr5 = mysqli_fetch_assoc($result5);
				?>
				
				<div id="zhongbu2">
					<div id="fenlei" style='font-size:20px;'>分类：<?php echo $arr5['name']; ?></div>
						<form method="post" action="./doReport.php">
							<input type="text" name="title" /><br/><br/><br/>　　　　　　
							<textarea name='content' cols='150' rows='50' style='width:500px;height:300px;'>  </textarea><br/><br/>
		　　　　　　　　    <input type=submit value="确认发帖"/>
							<input type='hidden' name='uid' value='<?php echo $_POST['id']; ?>' />
							<input type='hidden' name='tid' value='<?php echo $_POST['tid']; ?>' />
						</form>
				</div>
			</div>
				<div id="dibu">
					<div id="alianjie">
						<a href="#">联系我们</a>
						<span>|</sapn>
						<a href="#">无图版</a>
						<span>|</span>
						<a href="#">手机浏览</a>
						<span>|</span>
						<a href="#">清除COOKIES</a>
					</div>
					<div id="dibuwenzi">
						<p>Powered by phpwind v8.7 Certificate Copytight Time now is:08-22 08:45</p>
					</div>
					<div id="gongbeihao">
						<p>?2006-2015 LAMP兄弟连 版权所有 Gzip disabled 京ICP备11018177号 Total 0.040525(s) query 3,京公网安备11011302000117</p>
					</div>
				</div>
			
			</div>
		</div>
	
	
	</div>
	
	
	
	
	
</body>
</html>